package com.zhentao.controller;

import com.zhentao.pojo.Yuyue;
import com.zhentao.service.YuyueService;
import com.zhentao.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/yuyue")
public class YuYueController {
    @Autowired
    YuyueService yuyueService;

    @RequestMapping("add")
    public Result add(@RequestBody Yuyue yuyue){
        yuyueService.add(yuyue);
        return Result.OK();
    }
}
